//
//  AppDelegate.swift
//  flutter_swift
//
//  Created by liuyaozong on 2021/8/10.
//

import UIKit
import flutter_boost
@main
class AppDelegate: UIResponder, UIApplicationDelegate {


    var window: UIWindow?
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        // Override point for customization after application launch.
        //创建代理，做初始化操作
        let delegate = BoostDelegate()
        FlutterBoost.instance().setup(application, delegate: delegate) { engine in
            
        }
        
        window = UIWindow(frame: UIScreen.main.bounds)
        let navc = UINavigationController(rootViewController: ViewController())
        window?.rootViewController = navc
        window?.makeKeyAndVisible()
        // 4.GCD 主线程/子线程
        DispatchQueue.main.asyncAfter(deadline: .now() + 6) {
            FlutterBoost.instance().sendResultToFlutter(withPageName: "minePage", arguments: ["data": "lalalalallalalalalalala"])
        }



        return true
    }

}

